package com.andyou.modules.content.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.andyou.common.persistence.Page;
import com.andyou.common.service.CrudService;
import com.andyou.modules.content.entity.ContentPublishLog;
import com.andyou.modules.content.dao.ContentPublishLogDao;

/**
 * 内容发布日志（content_publish_log）Service
 * @author lgx
 * @version 2020-03-08
 */
@Service
@Transactional(readOnly = true)
public class ContentPublishLogService extends CrudService<ContentPublishLogDao, ContentPublishLog> {

	public ContentPublishLog get(String id) {
		return super.get(id);
	}
	
	public List<ContentPublishLog> findList(ContentPublishLog contentPublishLog) {
		return super.findList(contentPublishLog);
	}
	
	public Page<ContentPublishLog> findPage(Page<ContentPublishLog> page, ContentPublishLog contentPublishLog) {
		return super.findPage(page, contentPublishLog);
	}
	
	@Transactional(readOnly = false)
	public int save(ContentPublishLog contentPublishLog) {
		return super.save(contentPublishLog);
	}
	
	@Transactional(readOnly = false)
	public void delete(ContentPublishLog contentPublishLog) {
		super.delete(contentPublishLog);
	}
	
	
    @Transactional(readOnly = false)
	public void batchDelete(List<String> idList) {
		ContentPublishLog contentPublishLog = null;
		for (String id : idList) {
			contentPublishLog = new ContentPublishLog();
			contentPublishLog.setId(id);
			super.delete(contentPublishLog);
		}
	}
}